package com.iemp.my;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.beans.Transient;
import java.io.File;
import java.io.Serializable;

public class FileResource implements Serializable {

    private File file;
    private String fileName;
    private String downloadPath;
    private long fileSize;

    public FileResource(File file, String downloadPathPrefix) {
        this.file = file;
        this.fileName = file.getName();
        this.downloadPath = downloadPathPrefix + file.getName();
        this.fileSize = file.length();
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getDownloadPath() {
        return downloadPath;
    }

    public void setDownloadPath(String downloadPath) {
        this.downloadPath = downloadPath;
    }

    public long getFileSize() {
        return fileSize;
    }
}
